﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Scribd.Net
{
    /// <summary>
    /// Event argument for Service posting events.
    /// </summary>
    public sealed class ServicePostEventArgs : EventArgs
    {
        private string m_responseXml;
        private string m_restCall;
        private string m_methodName;

        /// <summary>
        /// ctor
        /// </summary>
        /// <param name="restCall">Call being made to the service</param>
        /// <param name="methodName">Name of the method being called</param>
        internal ServicePostEventArgs(string restCall, string methodName)
            : base()
        {
            m_restCall = restCall;
            m_methodName = methodName;
        }

        /// <summary>
        /// Cancel a post
        /// </summary>
        public bool Cancel { get; set; }

        /// <summary>
        /// Call being made to the service.
        /// </summary>
        public string RESTCall { get { return m_restCall; } }

        /// <summary>
        /// Method being called.
        /// </summary>
        public string MethodName { get { return m_methodName; } }

        /// <summary>
        /// Response document from the service
        /// </summary>
        public string ResponseXML { get { return m_responseXml; } internal set { m_responseXml = value; } }

    }
}